import { defineComponent, Slots } from 'vue'
import './index.styl'

function renderHeader(slots: Slots) {
  if (slots.header) {
    return <div class='app-page__header'>{slots.header()}</div>
  }
}

export default defineComponent({
  name: 'AppPage',
  render() {
    return (
      <div class='app-page'>
        {renderHeader(this.$slots)}
        {this.$slots.default?.()}
      </div>
    )
  }
})
